<%--
  Created by IntelliJ IDEA.
  User: reid
  Date: 17/1/9
  Time: 下午3:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    request.setAttribute("basePath", basePath);
%>
<!DOCTYPE>
<html>
<head>
    <title>在线支付结算审核</title>
    <%@ include file="/resources/js/easyui/taglibs.jsp" %>
    <%@ include file="/resources/js/easyui/_easyui.jsp" %>
    <%@ include file="/resources/js/easyui/_message.jsp" %>
    <%@ include file="/resources/js/easyui/_viewJS.jsp" %>
</head>

<body>

<div id="tb" style="padding:5px;height:auto;">
    <table>
        <tr>
            <td><label style="margin-left:5px">结算日期:</label></td>
            <td>
                <input class="Wdate" type="text" id="balanceDate" onClick="WdatePicker()">
            </td>
            <%--<td><label style="margin-left:5px">结算状态:</label></td>
            <td>
                <input style="width:150px" id="state" class="easyui-textbox"/>
            </td>--%>
            <td>
                <a href="javascript:;" style="margin-left: 10px;vertical-align:middle" class="easyui-linkbutton"
                   iconCls="icon-search" id="queryDataBtn">查询</a>
            </td>
        </tr>
    </table>

    <div id="button">
        <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" iconCls="icon-add" id="addWinBtn">进件初审</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" iconCls="icon-add"
           id="setupBusinessInfoWinBtn">设置用户商户号</a>
    </div>

</div>

<table id="dg"
       title="在线支付结算审核对账表"
       fitColumns="true"
       singleSelect="true"
       data-options="
       pageSize:10,
       toolbar:'#tb',
       pagination:true,
       collapsible:true,
       url:'${basePath}web/settle/list.json',
       method:'GET'">
    <thead>
    <tr>
        <th data-options="field:'settleId',checkbox:true,width:10"></th>
        <th data-options="field:'balanceDate',width:50" align="center">结算日期</th>
        <th data-options="field:'realName',width:50" align="center">姓名</th>
        <th data-options="field:'sumDetail',width:50" align="center">流水金额</th>
        <th data-options="field:'totalBalance',width:50" align="center">结算金额</th>
    </tr>
    </thead>
</table>

</body>
<script type="text/javascript">
    function View() {
        var that = this;

        that.events = [
            {sel: '#queryDataBtn', act: 'click', func: 'queryData'}
        ];

        that.$dataGrid = $('#dg');
        that.dataGridOption = {
            queryParams : {
                balanceDate : function(){return $('#balanceDate').val();},
            }
        };

        $.extend(that.dataGridOption, ViewHelper.template.gridOption);

        that.$dataGrid.datagrid(that.dataGridOption);

        that.queryData = function () {
            that.$dataGrid.datagrid(that.dataGridOption);
        };
    }

    var view;
    $(function () {
        inherit(View, EventHandler);
        view = new View();
    });
</script>

</html>
